package bold.module.lombok;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.junit.Test;

import java.util.HashSet;
import java.util.Set;

public class IombokTest {

    @Data
    @AllArgsConstructor
//    @EqualsAndHashCode(of = {"name"})//
    @EqualsAndHashCode(exclude = {"other"})//
    public static class A {
        private String name;
        private String other;
    }

    public static void main(String[] args) {
        Set<A> map = new HashSet<>();
        map.add(new A("1", "fsdfasd2"));
        map.add(new A("1", "fsdfasd312"));
        map.add(new A("1", "fsdfas421d"));
        map.add(new A("1", "fsdfasd123"));

        System.out.println(map);
    }



}
